package com.aspose.cells;

import java.util.ArrayList;

public class Comment {
   private CommentShape a;
   private CommentCollection b;
   private boolean c;
   private String d;
   private int e;
   private short f;

   public String getAuthor() {
      return this.d;
   }

   public void setAuthor(String value) {
      this.d = value;
   }

   Comment(CommentCollection comments) {
      this.b = comments;
      Worksheet var2 = this.b.a();
      this.a = new CommentShape(var2.getShapes(), this);
      this.c = false;
      this.d = this.b.a().c().ac();
   }

   Comment(CommentCollection comments, int row, int column) {
      this.c = true;
      this.e = row;
      this.f = (short)column;
      this.b = comments;
      Worksheet var4 = this.b.a();
      this.a = new CommentShape(var4.getShapes(), this);
      this.d = this.b.a().c().ac();
   }

   Comment() {
   }

   boolean a() {
      return this.c;
   }

   void a(boolean var1) {
      this.c = var1;
   }

   zbtz b() {
      return this.getCommentShape().aa();
   }

   void c() {
      int var1 = this.f + 1;
      boolean var2 = true;
      int var3;
      int var4;
      if (this.e == 0) {
         var4 = 1;
      } else {
         var3 = this.e - 1;
         if (this.e > 1048570) {
            var3 = this.e - 5;
         }

         var4 = this.a.c(0, 0, var3, 0) + (int)(this.a.b(var3, 105) + 0.5D);
      }

      if (this.f > 16380) {
         var1 = this.f - 3;
      } else {
         var1 = this.f + 1;
      }

      var3 = this.a.d(0, 0, var1, 0) + (int)(this.a.b(var1, 240) + 0.5D);
      this.a.a(0, false, var3, var4, 128, 74);
   }

   public CommentShape getCommentShape() {
      return this.a;
   }

   public int getRow() {
      return this.e;
   }

   void a(int var1) {
      this.e = var1;
   }

   public int getColumn() {
      return this.f;
   }

   void b(int var1) {
      this.f = (short)var1;
   }

   public String getNote() {
      return this.b().i();
   }

   public void setNote(String value) {
      this.b().a(value);
   }

   public String getHtmlNote() throws Exception {
      return this.b().j();
   }

   public void setHtmlNote(String value) {
      this.b().b(value);
   }

   public Font getFont() {
      return this.b().k();
   }

   public FontSetting characters(int startIndex, int length) {
      return this.b().a(startIndex, length);
   }

   public ArrayList getCharacters() {
      return this.b().p();
   }

   Font d() {
      return this.b().l();
   }

   void c(int var1) {
      this.b().g(var1);
   }

   public boolean isVisible() {
      return !this.a.isHidden();
   }

   public void setVisible(boolean value) {
      this.a.setHidden(!value);
   }

   public int getTextOrientationType() {
      return this.b().f();
   }

   public void setTextOrientationType(int value) {
      this.b().d(value);
   }

   public int getTextHorizontalAlignment() {
      return this.b().g();
   }

   public void setTextHorizontalAlignment(int value) {
      this.b().e(value);
   }

   public int getTextVerticalAlignment() {
      return this.b().h();
   }

   public void setTextVerticalAlignment(int value) {
      this.b().f(value);
   }

   void a(Comment var1) {
      this.b().a(var1.b());
      this.c = var1.c;
      this.d = var1.d;
   }

   public boolean getAutoSize() {
      return this.a.getTextFrame().getAutoSize();
   }

   public void setAutoSize(boolean value) {
      this.a.getTextFrame().a(value);
   }

   public double getHeightCM() {
      return this.getCommentShape().getHeightCM();
   }

   public void setHeightCM(double value) {
      this.getCommentShape().setHeightCM(value);
   }

   public double getWidthCM() {
      return this.getCommentShape().getWidthCM();
   }

   public void setWidthCM(double value) {
      this.getCommentShape().setWidthCM(value);
   }

   public double getWidthInch() {
      return this.getCommentShape().getWidthInch();
   }

   public void setWidthInch(double value) {
      this.getCommentShape().setWidthInch(value);
   }

   public double getHeightInch() {
      return this.getCommentShape().getHeightInch();
   }

   public void setHeightInch(double value) {
      this.getCommentShape().setHeightInch(value);
   }
}
